
public class Main {
    public static void main(String[] args) {

        // 顾客A购买情况
        int applePoundsA = 2;// 购买苹果斤数
        int strawberryPoundsA = 3;// 购买草莓斤数
        double totalA = Supermarket.calculateTotalPriceNormal(applePoundsA, strawberryPoundsA);
        // 验证计算结果的正确性
        double expectedPriceA = applePoundsA * 8 + strawberryPoundsA * 13;
        if (totalA == expectedPriceA) {
            System.out.println("顾客A购买" + applePoundsA + "斤苹果和" + strawberryPoundsA + "斤草莓，总价为:" + totalA + "元");
        } else {
            System.err.println("顾客A计算金额有误，请检查！");
        }

        // 顾客B购买情况
        int applePoundsB = 3;
        int strawberryPoundsB = 2;
        int mangoPoundsB = 1;
        double totalB = Supermarket.calculateTotalPriceNormal(applePoundsB, strawberryPoundsB, mangoPoundsB);
        // 验证计算结果的正确性
        double expectedPriceB = applePoundsB * 8 + strawberryPoundsB * 13 + mangoPoundsB * 20;
        if (totalB == expectedPriceB) {
            System.out.println("顾客B购买" + applePoundsB + "斤苹果、" + strawberryPoundsB + "斤草莓和" + mangoPoundsB + "斤芒果，总价为:" + totalB + "元");
        } else {
            System.err.println("顾客B计算金额有误，请检查！");
        }

        // 顾客C购买情况
        int applePoundsC = 2;
        int strawberryPoundsC = 8;
        int mangoPoundsC = 1;
        double totalC = Supermarket.calculateTotalPriceDiscounted(applePoundsC, strawberryPoundsC, mangoPoundsC);
        // 验证计算结果的正确性
        double expectedPriceC = applePoundsC * 8 + strawberryPoundsC * 13 * 0.8 + mangoPoundsC * 20;
        if (totalC == expectedPriceC) {
            System.out.println("顾客C购买" + applePoundsC + "斤苹果、" + strawberryPoundsC + "斤草莓和" + mangoPoundsC + "斤芒果，总价为:" + totalC + "元");
        } else {
            System.err.println("顾客C计算金额有误，请检查！");
        }

        // 顾客D购买情况
        int applePoundsD = 3;
        int strawberryPoundsD = 5;
        int mangoPoundsD = 2;
        double totalD = Supermarket.calculateTotalPriceReduction(applePoundsD, strawberryPoundsD, mangoPoundsD);
        // 验证计算结果的正确性
        double expectedPriceD = applePoundsD * 8 + strawberryPoundsD * 13 * 0.8 + mangoPoundsD * 20;
        if (expectedPriceD >= 100) {
            expectedPriceD -= 10;
        }
        if (totalD == expectedPriceD) {
            System.out.println("顾客D购买" + applePoundsD + "斤苹果、" + strawberryPoundsD + "斤草莓和" + mangoPoundsD + "斤芒果，总价为:" + totalD + "元");
        } else {
            System.err.println("顾客D计算金额有误，请检查！");
        }
    }
}